package main.cn.service.impl;

import main.cn.dao.OrderDao;
import main.cn.dao.impl.OrderDaoImpl;
import main.cn.pojo.Order;
import main.cn.service.OrderService;

import java.util.List;


public class OrderServiceImpl implements OrderService {

    private OrderDao orderDao = new OrderDaoImpl();

    @Override
    public void addOrder(Order order) {
        orderDao.addOrder(order);
    }

    @Override
    public void deleteOrderById(int id) {
        orderDao.deleteOrder(id);
    }

    @Override
    public void updateOrder(Order order) {
        orderDao.updateOrder(order);
    }

    @Override
    public Order queryOrderById(int id) {
        return orderDao.queryOrderById(id);
    }

    @Override
    public List<Order> queryOrders() {
        return orderDao.queryOrders();
    }
}
